<?php

class Controller extends CController
{
    public $setting = array();
    public $menuActive;
    public $breadcrumbs = array();
    public $user;

    public function init()
    {
        parent::init();
        $this->user = User::model()->findByPk(Yii::app()->user->id);
    }

    protected function beforeAction($action)
    {
        if (parent::beforeAction($action)) {
            $cs = Yii::app()->clientScript;
            $cs->registerCoreScript('jquery');
            return true;
        }
        return false;
    }
}